package com.feib.stms.dao;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.feib.stms.model.ConfirmRule;
import com.feib.stms.model.Group;
import com.feib.stms.service.ConfirmRuleService;



@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"applicationContext-config.xml", "applicationContext-dao.xml"})
public class ComfireRoleDaoTester {


	@Autowired
	@Qualifier("confirmRuleService")
	private ConfirmRuleService confirmRuleService;


	public  static ConfirmRuleDao confirmRuleDao;

	@Test
	public void testQueryByPaginatedList()
	{

		ConfirmRule confirmRule=new ConfirmRule();

		confirmRule.setConfirmRulePk(new Long(1));

		confirmRule.setConfirmCount(new Integer(1));

		confirmRule.setConfirmCount(new Integer(2));
		Group group=new Group();
		confirmRule.setGroup(group);
		group.setGroupPk(new Long(1));
		int insertCount = confirmRuleService.disableConfirmRule(confirmRule);

		System.out.print(insertCount);
	}

}
